import { readRawBody, getQuery, getMethod } from 'h3'

export default defineEventHandler(async (event) => {
  const $config = useRuntimeConfig()

  try {
    setCookie(event, $config.app.XSRF_HEADER, '', { maxAge: -1 })
    setCookie(event, $config.app.REFRESH_HEADER, '', { maxAge: -1 })
    setCookie(event, 'uinfo', '', { maxAge: -1 })
    return { state: true }
  } catch (error) {
    console.error(error)
  }
})
